From 4586d3883b83f8c28551c8372c4b8ad1470ebc47 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Fri, 15 Mar 2024 00:26:10 +0000
Subject: mobile: Fix the naming of the lists screen

---
 apps/mobile/app/dashboard/lists/[slug].tsx | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

(limited to 'apps/mobile/app/dashboard/lists/[slug].tsx')

diff --git a/apps/mobile/app/dashboard/lists/[slug].tsx b/apps/mobile/app/dashboard/lists/[slug].tsx
index fdd67763..f85aeeaf 100644
--- a/apps/mobile/app/dashboard/lists/[slug].tsx
+++ b/apps/mobile/app/dashboard/lists/[slug].tsx
@@ -11,20 +11,20 @@ export default function ListView() {
   }
   const { data: list } = api.lists.get.useQuery({ listId: slug });
 
-  if (!list) {
-    return <FullPageSpinner />;
-  }
-
   return (
     <>
       <Stack.Screen
         options={{
-          headerTitle: `${list.icon} ${list.name}`,
+          headerTitle: list ? `${list.icon} ${list.name}` : "Loading ...",
         }}
       />
-      <View>
-        <BookmarkList archived={false} ids={list.bookmarks} />
-      </View>
+      {list ? (
+        <View>
+          <BookmarkList archived={false} ids={list.bookmarks} />
+        </View>
+      ) : (
+        <FullPageSpinner />
+      )}
     </>
   );
 }
-- 
cgit v1.2.3-70-g09d2

